package com.bdmc.report.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bdmc.common.annotation.ExcelDictFormat;
import com.bdmc.common.convert.ExcelDictConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

;

/**
 * 人员考勤视图对象 report_check_work
 *
 * @author bdmc
 * @date 2022-03-11
 */
@Data
@ExcelIgnoreUnannotated
public class ReportCheckWorkVo {

	private static final long serialVersionUID = 1L;

    /**
     * 排班考勤
     */
	private Long checkWorkId;

    /**
     * 日期
     */
	@ExcelProperty(value = "日期")
	private String effectDate;

    /**
     * 计划详情id
     */
	private Long planDetailId;

    /**
     * 排班计划id
     */
	private Long workPlanId;

    /**
     * 工作组id
     */
	private Long workTeamId;

    /**
     * 人员id
     */
	private Long personId;

    /**
     * 设备id
     */
	private Long deviceId;

    /**
     * 车辆id
     */
	private Long carId;

    /**
     * 围栏id
     */
	private Long fenceId;

	@ExcelProperty(value = "人员姓名")
	private String personName;

	@ExcelProperty(value = "所属部门")
	private String deptName;

	@ExcelProperty(value = "排班名称")
	private String workPlanName;

	@ExcelProperty(value = "班组名称")
	private String workTeamName;

    /**
     * 工作计划类型
     */
	@ExcelProperty(value = "工作对象类型",converter = ExcelDictConvert.class)
	@ExcelDictFormat(dictType = "work_plan_type")
	private String workPlanType;

    /**
     * 班组开始时间
     */
	private String startSpan;

    /**
     * 班组结束时间
     */
	private String endSpan;

	@ExcelProperty(value = "班组时间")
	private String planTime;

    /**
     * 工作状态0，未上班，1，已上班，2，已下班
     */

	@ExcelProperty(value = "考勤状态", converter = ExcelDictConvert.class)
	@ExcelDictFormat(dictType = "report_work_state")
	private Integer workState;

    /**
     * 实际上班时间
     */
	//@ExcelProperty(value = "实际上班时间",converter = LocalDateTimeConverter.class)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime startWorkTime;

    /**
     * 实际下班时间
     */
	//@ExcelProperty(value = "实际下班时间",converter = LocalDateTimeConverter.class)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime endWorkTime;

	@ExcelProperty(value = "实际工作时间")
	private String workTime;


    /**
     * 实际上班维度
     */
	@ExcelProperty(value = "实际上班纬度")
	private String startWorkLat;

    /**
     * 实际上班经度
     */
	@ExcelProperty(value = "实际上班经度")
	private String startWorkLng;

    /**
     * 实际下班维度
     */
	@ExcelProperty(value = "实际下班维度")
	private String endWorkLat;

    /**
     * 实际下班精度
     */
	@ExcelProperty(value = "实际下班精度")
	private String endWorkLng;



	@ExcelProperty(value = "缺勤原因")
	private String absenceReason;
}
